<!--
			URL/edit/:title/profiles
			app/views/profiles/edit.html.erb
			The edit resume-profiles view - displays the form to edit profiles part for a resume (:title) of a user
			controller: profiles, action: edit
-->
	
<link rel="stylesheet" type="text/css" href="/stylesheets/resume_common.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/profiles/edit.css" />	

<div class="heading">
	<h3> Edit Profile </h3>
	<div class="links">
		<%= link_to 'Show', '/show/'+@resume.title+'/profiles' %>
		<%= link_to 'Remove', '/destroy/'+@resume.title+'/profiles', :confirm => 'Are you sure?', :method => :delete %>	
	</div>	
</div>

<% url = '/update/'+@resume.title+'/profiles' %>
<% form_tag(url, :method => "post") do %>

	<% if @profile %>
	<table class="profile_table">
		<tr>
			<td class="column1">	Profile info	</td>
			<td class="column2">
				<textarea 
					name="profile[profile_text]"
					class="profile_text"><%=h @profile.profile_text %></textarea></td>
		</tr>
		<tr>  
			<td></td>
			<td class="submit"><input name="commit" type="submit" value="Update" /></td>	
		</tr> 
	</table>	
	<% else %>
		<p>
			No profile data.
			<%= link_to 'Add', '/new/'+@resume.title+'/profiles' %>		
		</p>	
	<% end #if-else %>
	
<% end # form %> 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="/javascripts/resume_common.js"></script>
<script type="text/javascript" src="/javascripts/profiles/edit.js"></script>